package pack0603;

import java.util.Scanner;
//输入一个六位数,判断对应日期有多少天

public class DemoA {
    public static void main(String[] args) {
        //开启键盘录入事件
        Scanner ying =new Scanner(System.in);
        System.out.println("输入六位数: ");
        int a=ying.nextInt();
        int year =a/100; //获取年份
        int moth =a%100; //获取月份
        if (moth==1||moth==3||moth==5||moth==7||moth==8||moth==10||moth==12){
            System.out.println("本月共有31天");
        }else if(moth==4||moth==6||moth==8||moth==10) {
            System.out.println("本月共有30天");
        }else if(moth==2){
            if(a%4==0&&a/100!=0||a/400==0){
                System.out.println("本月共有29天");

            }else{
                System.out.println("本月共有28天");
            }

        }

    }
}
